package com.ruoyi.vehicle.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.vehicle.mapper.TbServabilityMapper;
import com.ruoyi.vehicle.domain.TbServability;
import com.ruoyi.vehicle.service.ITbServabilityService;

/**
 * 可服务司机设置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class TbServabilityServiceImpl implements ITbServabilityService 
{
    @Autowired
    private TbServabilityMapper tbServabilityMapper;

    /**
     * 查询可服务司机设置
     * 
     * @param servabilityId 可服务司机设置主键
     * @return 可服务司机设置
     */
    @Override
    public TbServability selectTbServabilityByServabilityId(Long servabilityId)
    {
        return tbServabilityMapper.selectTbServabilityByServabilityId(servabilityId);
    }

    /**
     * 查询可服务司机设置列表
     * 
     * @param tbServability 可服务司机设置
     * @return 可服务司机设置
     */
    @Override
    public List<TbServability> selectTbServabilityList(TbServability tbServability)
    {
        return tbServabilityMapper.selectTbServabilityList(tbServability);
    }

    /**
     * 新增可服务司机设置
     * 
     * @param tbServability 可服务司机设置
     * @return 结果
     */
    @Override
    public int insertTbServability(TbServability tbServability)
    {
        tbServability.setCreateTime(DateUtils.getNowDate());
        return tbServabilityMapper.insertTbServability(tbServability);
    }

    /**
     * 修改可服务司机设置
     * 
     * @param tbServability 可服务司机设置
     * @return 结果
     */
    @Override
    public int updateTbServability(TbServability tbServability)
    {
        return tbServabilityMapper.updateTbServability(tbServability);
    }

    /**
     * 批量删除可服务司机设置
     * 
     * @param servabilityIds 需要删除的可服务司机设置主键
     * @return 结果
     */
    @Override
    public int deleteTbServabilityByServabilityIds(Long[] servabilityIds)
    {
        return tbServabilityMapper.deleteTbServabilityByServabilityIds(servabilityIds);
    }

    /**
     * 删除可服务司机设置信息
     * 
     * @param servabilityId 可服务司机设置主键
     * @return 结果
     */
    @Override
    public int deleteTbServabilityByServabilityId(Long servabilityId)
    {
        return tbServabilityMapper.deleteTbServabilityByServabilityId(servabilityId);
    }
}
